home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_basi / n_b-v200.zip / NBV3 / DMO / VFONT.DMO < prev    next >
Text File  |  1996-03-11  |  4KB  |  63 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   VFONT   .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20. $INCLUDE "DAS-NB01.INC"
  21. $INCLUDE "DAS-NB02.INC"
  22. $INCLUDE "DAS-NBV1.INC"
  23. $INCLUDE "DAS-NBV3.INC"
  24.  
  25. SCREEN 12
  26. GraphicSETUP
  27.  
  28. ? "┌───────────────────────────────────────────────────────────────────────
  29. ? "│ fVFontLoad% ( FontFileName$ )
  30. ? "│ fVprintG%   ( X1%, Y1%, Text$, Attr? )
  31. ? "├─────────────────────────────────────────────────────────────────────────
  32. ? "│ Vfonts are simply the standard 8x16 VGA fonts, stuffed into a file that,
  33. ? "│ when loaded into an array and stuffed through one of the PutXXX routines
  34. ? "│ prints the characters to the screen. SEE: MAKEFONT.BAS
  35. ? "├─────────────────────────────────────────────────────────────────────────
  36. ? "│ fVprintG% uses internally loaded Vfonts, fPutFBarr, fBackground? and
  37. ? "│ fForeground?. It puts text using graphic mode addresses but is also
  38. ? "│ used by fVprint?, fVprintM?, etc.
  39. ? "└─────────────────────────────────────────────────────────────────────────────
  40.  
  41. FileName$ = "DMO\V-FONT.850"
  42.                                                '┌────────────────────────────
  43. IF NOT fVfontLoad%( FileName$ ) THEN           '│ load codepage 850 font
  44.   PRINT "CAN'T FIND THE FONT FILE"             '│  oops!
  45.   END                                          '│
  46. END IF                                         '│
  47.                                                '│
  48. U$ = CHR$(35,35,35,17,15)                      '│ using string
  49. FOR Col% = 0 TO 638 STEP 40                    '│ row/col printing
  50.   FOR Row% = 192 TO 478 STEP 16                '│
  51.     Text$ = USING$( U$, A% )                   '│ ascii value & attr trigger
  52.     REPLACE " " WITH "0" IN Text$              '│ pad w/ zero's
  53.     Text$ = Text$ + CHR$(A%)                   '│ add the character
  54.     IF A% = 17 THEN Text$ = Text$ + CHR$(A%)   '│ attr trigger so one more
  55.     fVprintG% Col%, Row%, Text$, 7             '│ print it
  56.     IF A% = 255 THEN EXIT, EXIT                '│ all done!
  57.     INCR A%, 1                                 '│ next character
  58.   NEXT                                         '│
  59. NEXT                                           '│
  60.                                                '│
  61. fAnyKey                                        '│ THUMP A KEY
  62. CLS                                            '│ clean up & go home
  63. SCREEN 0                                       '└────────────────────────────